export const backRoute = [
  {
    path: "/back",
    component: () => import("@/views/back/layout/index.vue"),
    name: "back",
    meta: {
      title: "",
      hidden: true,
      icon: "",
    },
    redirect: "/back/info",
    children: [
      {
        path: "/back/info",
        component: () => import("@/views/back/info/index.vue"),
        name: "back_info",
        meta: {
          title: "IP知识库",
          hidden: false,
          icon: "HomeFilled",
        },
      },
      {
        path: "/back/info/detail",
        component: () => import("@/views/back/info/detail/index.vue"),
        name: "info_detail",
        meta: {
          title: "新闻详情",
          hidden: true,
          icon: "Edit",
        },
      },
      {
        path: "/back/video",
        component: () => import("@/views/back/video/index.vue"),
        name: "backvideo",
        meta: {
          title: "视频管理",
          hidden: false,
          icon: "HomeFilled",
        },
      },
      {
        path: "/back/member",
        name: "member",
        meta: {
          title: "会员管理",
          hidden: false,
          icon: "HomeFilled",
        },
        redirect: "/back/member/code",
        children: [
          {
            path: "/back/member/code",
            component: () => import("@/views/back/member/code/index.vue"),
            name: "code",
            meta: {
              title: "兑换码管理",
              hidden: false,
              icon: "HomeFilled",
            },
          },
          // {
          //   path: "/back/member/code",
          //   component: () => import("@/views/back/video/index.vue"),
          //   name: "backvideo",
          //   meta: {
          //     title: "xx管理",
          //     hidden: false,
          //     icon: "HomeFilled",
          //   },
          // },
        ],
      },
      // {
      //   path: "/back/feedback",
      //   component: () => import("@/views/back/feedback/index.vue"),
      //   name: "back_feedback",
      //   meta: {
      //     title: "投诉建议",
      //     hidden: false,
      //     icon: "ChatLineSquare",
      //   },
      // },
      // {
      //   path: "/back/statistical",
      //   component: () => import("@/views/back/statistical/index.vue"),
      //   name: "back_statistical",
      //   meta: {
      //     title: "流量统计",
      //     hidden: false,
      //     icon: "PieChart",
      //   },
      // },
      // {
      //   path: "/back/user",
      //   component: () => import("@/views/back/user/index.vue"),
      //   name: "user",
      //   meta: {
      //     title: "用户管理",
      //     hidden: false,
      //     icon: "UserFilled",
      //   },
      // },
      // {
      //   path: "/back/banner",
      //   component: () => import("@/views/back/banner/index.vue"),
      //   name: "banner",
      //   meta: {
      //     title: "banner管理",
      //     hidden: false,
      //     icon: "Tools",
      //   },
      // },
    ],
  },
];

//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    path: "/",
    component: () => import("@/views/front/frontLayout/index.vue"),
    name: "frontLayout",
    meta: {
      title: "",
      hidden: true,
      icon: "",
    },
    redirect: "/home",
    children: [
      {
        path: "/home",
        component: () => import("@/views/front/home/index.vue"),
        name: "home",
        meta: {
          title: "首页",
          hidden: true,
          icon: "",
        },
      },
      {
        path: "/news",
        component: () => import("@/views/front/news/index.vue"),
        name: "news",
        meta: {
          title: "新闻",
          hidden: true,
          icon: "",
        },
      },
      {
        path: "/news_detail",
        component: () => import("@/views/front/news/detail/index.vue"),
        name: "news_detail",
        meta: {
          title: "新闻详情",
          hidden: true,
          icon: "",
        },
      },

      {
        path: "/search",
        component: () => import("@/views/front/search/index.vue"),
        name: "search",
        meta: {
          title: "视频",
          hidden: true,
          icon: "",
        },
        redirect: "/search/video",
        children: [
          {
            path: "/search/video",
            component: () => import("@/views/front/search/video.vue"),
            name: "search_video",
            meta: {
              title: "视频搜索",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/play",
            component: () => import("@/views/front/play/index.vue"),
            name: "play",
            meta: {
              title: "视频播放",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/play1",
            component: () => import("@/views/front/play1/index.vue"),
            name: "play1",
            meta: {
              title: "视频播放1",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/play2",
            component: () => import("@/views/front/play2/index.vue"),
            name: "play1",
            meta: {
              title: "视频播放2",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/play3",
            component: () => import("@/views/front/play3/index.vue"),
            name: "play3",
            meta: {
              title: "视频播放3",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/buy",
            component: () => import("@/views/front/buy/index.vue"),
            name: "buy",
            meta: {
              title: "已购买的课程",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/pay",
            component: () => import("@/views/front/pay/index.vue"),
            name: "pay",
            meta: {
              title: "待付款的课程",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/exchange",
            component: () => import("@/views/front/exchange/index.vue"),
            name: "exchange",
            meta: {
              title: "兑换中心",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/exchange_success",
            component: () => import("@/views/front/exchange/success.vue"),
            name: "exchange_success",
            meta: {
              title: "兑换成功",
              hidden: true,
              icon: "",
            },
          },
          {
            path: "/search/account",
            component: () => import("@/views/front/account/index.vue"),
            name: "account",
            meta: {
              title: "账号设置",
              hidden: true,
              icon: "",
            },
          },
        ],
      },
      {
        path: "/feedback",
        component: () => import("@/views/front/feedback/index.vue"),
        name: "feedback",
        meta: {
          title: "投诉建议",
          hidden: true,
          icon: "",
        },
      },
    ],
  },
  {
    //登录
    path: "/back_login",
    component: () => import("@/views/back/login/index.vue"),
    name: "login",
    meta: {
      title: "登录",
      hidden: true,
      icon: "Promotion",
    },
  },
  ...backRoute,
  // {
  //   path: "/:pathMatch(.*)*",
  //   name: "404",
  //   component: () => import("@/views/front/404/index.vue"),
  // },
  {
    //404
    path: "/:pathMatch(.*)*",
    component: () => import("@/views/front/404/index.vue"),
    name: "404",
    meta: {
      title: "404",
      hidden: true,
      icon: "DocumentDelete",
    },
  },
];

//异步路由
export const asnycRoute = [];

//任意路由
// export const anyRoute = {
//   //任意路由
//   path: "/:pathMatch(.*)*",
//   redirect: "/404",
//   name: "Any",
//   meta: {
//     title: "任意路由",
//     hidden: true,
//     icon: "DataLine",
//   },
// };
